<template>
  <div>
    <div class="item"
         v-if="funIndex != 3">
      <div class="info">
        <span v-if="funIndex == 0">{{entity.nickname}}</span>
        <span v-if="funIndex == 1 || funIndex == 3 || funIndex == 2">{{entity.patients_name}}</span>
        <span class="right">{{entity.mobile}}</span>
      </div>
      <div class="flex-box">
        <div class="num">住院号：{{entity.admission_number || '暂无'}}</div>
        <div class="carcinoma">癌种：{{entity.carcinoma}}</div>
      </div>
    </div>
    <div class="item"
         v-if="funIndex == 3 && entity.is_show === 1">
      <div class="info">
        <span v-if="funIndex == 0">{{entity.nickname}}</span>
        <span v-if="funIndex == 1 || funIndex == 3 || funIndex == 2">{{entity.patients_name}}</span>
        <span class="right">{{entity.mobile}}</span>
      </div>
      <div class="flex-box">
        <div class="num">住院号：{{entity.admission_number || '暂无'}}</div>
        <div class="carcinoma">癌种：{{entity.carcinoma}}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    entity: {
      type: Object,
      default: () => { }
    },
    funIndex: {
      type: [Number, String],
      default: 0
    }
  },
  name: 'Card'
}
</script>

<style scoped lang="less">
.item {
  height: 71px;
  background: #ffffff;
  border: 1px solid #3f78f9;
  border-radius: 8px;
  padding: 8px 12px;
  box-sizing: border-box;
  .info {
    width: 100%;
    height: 25px;
    font-size: 15px;
    font-family: PingFang SC;
    font-weight: 600;
    line-height: 30px;
    color: #161616;
    .right {
      float: right;
      color: #999999;
      font-weight: 400;
    }
  }
  .num {
    // height: 18px;
    font-size: 13px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 30px;
    color: #595959;
  }
  .flex-box {
    display: flex;
    // background-color: pink;
    width: 100%;
    align-items: baseline;
    justify-content: space-between;
    .carcinoma {
      font-size: 13px;
      color: #595959;
    }
  }
}
</style>
